﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Models;
using System.Web.Script.Serialization;


namespace 公司CRM客户关系系统
{
    /// <summary>
    /// main 的摘要说明
    /// </summary>
    public class main : IHttpHandler,System.Web.SessionState.IRequiresSessionState
    {

        public void ProcessRequest(HttpContext context)
        {
            string action = context.Request["action"];
            if (action == "getu")
            {
                V_Users u = context.Session["user"] as V_Users;
                //返回json字符串
                JavaScriptSerializer jss = new JavaScriptSerializer();
                string json = jss.Serialize(u);
                context.Response.Write(json);
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}